package net.whzjkj.gateway.model.entity.mongo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.lang.annotation.Documented;
import java.math.BigDecimal;
import java.util.Date;

/**
 * OBD设备定位信息
 */
@Data
@Accessors(chain = true)
@Document(collection = "_obd_local")
public class ObdLocationMongo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Field("_id")
	@TableId(value = "id", type = IdType.ID_WORKER_STR)
	private String id;

	@Field("_v_id")
	@ApiModelProperty("车辆id")
	private String vehicleId;

	@Field("_e_id")
	@ApiModelProperty("设备id")
	private String equipmentId;

	@Field("_v_t_id")
	@ApiModelProperty("行程id")
	private String vehicleTrackId;

	@Field("_lat")
	@ApiModelProperty("纬度")
	private BigDecimal latitude;

	@Field("_lon")
	@ApiModelProperty("经度")
	private BigDecimal longitude;

	@Field("_clat")
	@ApiModelProperty("纠偏后纬度")
	private BigDecimal corlat;

	@Field("_clon")
	@ApiModelProperty("纠偏后经度")
	private BigDecimal corlong;

	@Field("_local")
	@ApiModelProperty("定位地址")
	private String localtion;

	@Field("_l_time")
	@ApiModelProperty("定位时间")
	private Date localtionTime;

	@Field("_speed")
	@ApiModelProperty("速度")
	private BigDecimal speed;

	@Field("_direction")
	@ApiModelProperty("方向")
	private BigDecimal direction;

	@Field("_pos")
	@ApiModelProperty("是否定位（1：定位  2-无效定位）")
	private Integer pos;
	
	@ApiModelProperty("是否GPS时间（1-GPS时间  2-GSM时间）")
	private Integer gps;
	
	@ApiModelProperty("是否基站码转GPS（1-基站码  2-基站码转GPS）")
	private Integer bs;
	
	@ApiModelProperty("当前行程耗油量")
	private BigDecimal oil;
	
	@ApiModelProperty("当前车辆里程")
	private BigDecimal smil;
	
	@ApiModelProperty("当前位置总里程（KM）")
	private BigDecimal lmil;
	
	@ApiModelProperty("当前位置总油耗（L）")
	private BigDecimal fuel;
	
	@ApiModelProperty("当前车辆状态(1:车辆怠速2:车辆运动  3-车辆熄火)")
	private Integer lstatus;
	
	private Integer status;
	
	private Date createTime;
	
}